def commission(UserDataBaseA, UserDataBaseB, accountA, accountB, amount, interval) -> float:  # 手续费接口
    """
    A -> B，该方法已在账户 A 数据中扣除手续费
    :param UserDataBaseA: 转账方银行数据
    :param UserDataBaseB: 转入方银行数据
    :param accountA: 转账账号
    :param accountB: 转入账号
    :param amount: 转账金额
    :param interval: 转账手续费区间(2000,5000,10000,50000,大于50000)
    :return: 手续费金额
    """
    CABank, CBBank = "A", "B"
    com = 0
    userA = {}.items()
    for userA in UserDataBaseA.items():
        if accountA == userA[1]['account']:
            CABank = userA[1]['bank']
            break
    for userB in UserDataBaseB.items():
        if accountB == userB[1]['account']:
            CBBank = userB[1]['bank']
            break
    if CABank == CBBank: com = 0
    elif amount < 2000: com = 1.6
    elif 2000 <= amount < 5000: com = 4
    elif 5000 <= amount < 10000: com = 8
    elif 10000 <= amount < 50000: com = 12
    elif amount >= 50000:
        com = amount * 0.0003
        if com > 50: com = 50
    userA[1]['balance'] -= com
    return com
